import { createRouter, createWebHistory } from 'vue-router'

export default createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../view/Home.vue'),
      children: [
        {
          path: '',
          name: 'dashboard',
          component: () => import("../view/components/Dashboard.vue")
        },
        {
          path: 'detail/:id',
          name: 'detail',
          component: () => import("../view/components/Detail.vue")
        }
      ]
    },
  ]
})
